import xlrd
def read_xlrd(excelAPI):
    book = xlrd.open_workbook(excelAPI)
    table = book.sheet_by_index(0)  #通过列表索引获取工作表
    for rowNum in range(table.nrows):
        rowVale = table.row_values(rowNum)
        for colNum in range(table.ncols):
            if rowNum > 0 and colNum == 0:
                print(str(rowVale[0]))
            else:
                print(rowVale[colNum])
        print('------------------')

if __name__ == '__main__':
    excelAPI = r'C:\Users\Administrator\Desktop\Similator API.xls'
    read_xlrd(excelAPI=excelAPI)


